home *** CD-ROM | disk | FTP | other *** search
/ DigitalVision: Cats & Dogs / DigitalVision: Cats & Dogs - Disc 1.iso / pc / s_saver / dv_onlin.exe / dv_onlin.dcr / Internal_23_a - animate random follow text.ls < prev    next >
Encoding:
Text File  |  2000-07-28  |  607 b   |  33 lines

  1. property pSprite, pDelay, pblendam, pActive
  2.  
  3. on beginSprite me
  4.   pSprite = sprite(me.spriteNum)
  5.   pDelay = the timer
  6.   pblendam = 4
  7.   pActive = 0
  8.   pSprite.locZ = pSprite.locZ + 1000
  9. end
  10.  
  11. on exitFrame me
  12.   if pActive then
  13.     if pDelay < the timer then
  14.       pSprite.loc = sprite(136).loc + point(random(6) - 3, 0)
  15.       pDelay = the timer + 2
  16.     end if
  17.   end if
  18. end
  19.  
  20. on animswitch me, bool
  21.   if bool = 1 then
  22.     if not pActive then
  23.       pActive = 1
  24.       pSprite.loc = point(400, 300)
  25.     end if
  26.   else
  27.     if pActive then
  28.       pActive = 0
  29.       pSprite.loc = point(1000, 1000)
  30.     end if
  31.   end if
  32. end
  33.